import 'package:flutter/material.dart';
import 'package:flutter_shop/pages/base/base_presenter.dart';
import 'package:flutter_shop/pages/base/base_state.dart';
import 'package:flutter_shop/pages/category/category_tab_page/entity/category_data.dart';
import 'package:flutter_shop/pages/category/category_tab_page/provider/sub_category_provider.dart';
import 'package:flutter_shop/pages/category/category_tab_page/widget/sub_category_goods.dart';
import 'package:flutter_shop/pages/category/category_tab_page/widget/sub_category_nav.dart';
import 'package:provider/provider.dart';

///右侧面板
class RightPlane extends StatefulWidget {
  @override
  _RightPlaneState createState() => _RightPlaneState();
}

class _RightPlaneState extends BaseState<RightPlane, BasePresenter> {
  @override
  Widget build(BuildContext context) {
    //获取当前子分类
    List<CategoryDataBxMallSubDto> subCategoryList = Provider.of<SubCategoryProvider>(context).subCategoryList;

    return Container(
        child: Column(
      children: <Widget>[
        SubCategoryNav(tabs: subCategoryList),
        Expanded(child: SubCategoryGoods()),
      ],
    ));
  }
}
